<!DOCTYPE html>
<html lang="zh-CN" class="login-bg" style="background-image: url(images/landscape.jpg)">

<head>
    <% include _head.html %>
    <title>登录</title>
    <link href="/css/login.css" rel="stylesheet">
    <link rel="stylesheet" type="text/css" href="css/lib/font-awesome.css">
    <link rel="stylesheet" href="css/compiled/signin.css" type="text/css" media="screen" />
    <link href='css/fonts.css' rel='stylesheet' type='text/css'>
</head>
<body style="padding-top: 0px">
<div class="login-wrapper">
    <div class="box">
        <div class="content-wrap">
            <h6>登录</h6>
            <input class="form-control" id="inputUsername" type="text" placeholder="用户名或手机号" required autofocus value="admin">
            <input class="form-control" id="inputPassword" type="password" placeholder="密码" required value="123456">
            <a href="/resetPassword" class="forgot">忘记密码?</a>
            <div class="remember">
                <input id="remember-me" type="checkbox" checked="checked">
                <label for="remember-me" >记住密码</label>
            </div>
            <button id="loginButton" class="btn btn-lg btn-primary btn-block" type="submit">登录</button>
        </div>
    </div>

    <div class="no-account">
        <p style="color: white">还没账号?</p>
        <a style="color: #00B7FF" href="/register">注册</a>
    </div>
</div>

</body>
</html>
<% include _foot.html %>
<script>
    $(function () {
        $('#loginButton').click(function (e) {
            e.preventDefault();
            var username = $("#inputUsername").val();
            var password = $("#inputPassword").val();
            if(!username){
                alert("用户名不能为空");
                //将焦点移动到用户名上
                $("#inputUsername").focus();
                return;
            }
            if(!password){
                alert("密码不能为空");
                //移动焦点到密码
                $("#inputPassword").focus();
                return;
            }
            goUrl('/login',  {username: username, password: password}, '/orderlist');
        })
    })

</script>